using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using Planisoft.Entities;

namespace Planisoft.DAO.Mapping
{
    public class NivelEducativoMap : EntityTypeConfiguration<NivelEducativo>
    {
        public NivelEducativoMap()
        {
            // Primary Key
            this.HasKey(t => t.IdNivelEducativo);

            // Properties
            this.Property(t => t.CodPdtNivEduca)
                .HasMaxLength(10);

            this.Property(t => t.DescNivEduca)
                .IsRequired();

            // Table & Column Mappings
            this.ToTable("NivelEducativo");
            this.Property(t => t.IdNivelEducativo).HasColumnName("IdNivelEducativo");
            this.Property(t => t.CodPdtNivEduca).HasColumnName("CodPdtNivEduca");
            this.Property(t => t.DescNivEduca).HasColumnName("DescNivEduca");
        }
    }
}
